Optimal. Leaf size=80 \[ -b^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+(a-b)^{3/2} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt {a+b \cot ^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3670, 474, 523, 217, 206, 377, 203} \[ -b^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+(a-b)^{3/2} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt {a+b \cot ^2(x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 206
Rule 217
Rule 377
Rule 474
Rule 523
Rule 3670
Rubi steps
\begin {align*} \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx &=-\operatorname {Subst}\left (\int \frac {\left (a+b x^2\right )^{3/2}}{x^2 \left (1+x^2\right )} \, dx,x,\cot (x)\right )\\ &=a \sqrt {a+b \cot ^2(x)} \tan (x)-\operatorname {Subst}\left (\int \frac {-a (a-2 b)+b^2 x^2}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )\\ &=a \sqrt {a+b \cot ^2(x)} \tan (x)+(a-b)^2 \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right ) \sqrt {a+b x^2}} \, dx,x,\cot (x)\right )-b^2 \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\cot (x)\right )\\ &=a \sqrt {a+b \cot ^2(x)} \tan (x)+(a-b)^2 \operatorname {Subst}\left (\int \frac {1}{1-(-a+b) x^2} \, dx,x,\frac {\cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-b^2 \operatorname {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )\\ &=(a-b)^{3/2} \tan ^{-1}\left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-b^{3/2} \tanh ^{-1}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \sqrt {a+b \cot ^2(x)} \tan (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.74, size = 222, normalized size = 2.78 \[ \frac {\sin (x) \sqrt {-\left (\csc ^2(x) ((a-b) \cos (2 x)-a-b)\right )} \left (\sqrt {a-b} \left (\sqrt {2} b^2 \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {-b} \cos (x)}{\sqrt {(a-b) \cos (2 x)-a-b}}\right )+a \sqrt {-b} \sec (x) \sqrt {(a-b) \cos (2 x)-a-b}\right )-\sqrt {2} \sqrt {-b} (a-b)^2 \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {a-b} \cos (x)}{\sqrt {(a-b) \cos (2 x)-a-b}}\right )\right )}{\sqrt {2} \sqrt {-b} \sqrt {a-b} \sqrt {(a-b) \cos (2 x)-a-b}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.43, size = 543, normalized size = 6.79 \[ \left [\frac {1}{4} \, {\left (-a + b\right )}^{\frac {3}{2}} \log \left (-\frac {a^{2} \tan \relax (x)^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \relax (x)^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \relax (x)^{3} - {\left (a - 2 \, b\right )} \tan \relax (x)\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{\tan \relax (x)^{4} + 2 \, \tan \relax (x)^{2} + 1}\right ) + \frac {1}{2} \, b^{\frac {3}{2}} \log \left (\frac {a \tan \relax (x)^{2} - 2 \, \sqrt {b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x) + 2 \, b}{\tan \relax (x)^{2}}\right ) + a \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x), \sqrt {-b} b \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)}{b}\right ) + \frac {1}{4} \, {\left (-a + b\right )}^{\frac {3}{2}} \log \left (-\frac {a^{2} \tan \relax (x)^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \relax (x)^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \relax (x)^{3} - {\left (a - 2 \, b\right )} \tan \relax (x)\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}}}{\tan \relax (x)^{4} + 2 \, \tan \relax (x)^{2} + 1}\right ) + a \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x), \frac {1}{2} \, {\left (a - b\right )}^{\frac {3}{2}} \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)}{a \tan \relax (x)^{2} - a + 2 \, b}\right ) + \frac {1}{2} \, b^{\frac {3}{2}} \log \left (\frac {a \tan \relax (x)^{2} - 2 \, \sqrt {b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x) + 2 \, b}{\tan \relax (x)^{2}}\right ) + a \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x), \frac {1}{2} \, {\left (a - b\right )}^{\frac {3}{2}} \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)}{a \tan \relax (x)^{2} - a + 2 \, b}\right ) + \sqrt {-b} b \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)}{b}\right ) + a \sqrt {\frac {a \tan \relax (x)^{2} + b}{\tan \relax (x)^{2}}} \tan \relax (x)\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.69, size = 1276, normalized size = 15.95 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \cot \relax (x)^{2} + a\right )}^{\frac {3}{2}} \tan \relax (x)^{2}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {tan}\relax (x)}^2\,{\left (b\,{\mathrm {cot}\relax (x)}^2+a\right )}^{3/2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \cot ^{2}{\relax (x )}\right )^{\frac {3}{2}} \tan ^{2}{\relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________